Skip to content

Conversation

@cpiber
Copy link

@cpiber cpiber commented Oct 19, 2025

In a recent stream, @rexim decided that coroutines are not feasible due to the requirement of a scheduler.
With this POC, I want to show that this is very much not required. In this simple example, I have a task combine that simply iterates a list of tasks, and calls each of them. I think you already had this in the stream.

Then in the stream you went in the direction of co_await, which as you said requires implementation of custom schedulers. In effect, however, the kind of await you seek can be implemented trivially via a macro, which simply exhauts the coroutine. I am not sure why such a use-case was not considered in the standard, since this is also how Rust does it (poll until complete) afaik.

Sorry if you already knew this, just felt the conclusion of the stream was a bit unsatisfying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant